package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.WaterPriceconfigMapper;
import com.ruoyi.system.domain.WaterPriceconfig;
import com.ruoyi.system.service.IWaterPriceconfigService;

/**
 * 价格设置Service业务层处理
 *
 * @author ruoyi
 * @date 2025-09-16
 */
@Service
public class WaterPriceconfigServiceImpl implements IWaterPriceconfigService
{
    @Autowired
    private WaterPriceconfigMapper waterPriceconfigMapper;

    /**
     * 查询价格设置
     *
     * @param id 价格设置主键
     * @return 价格设置
     */
    @Override
    public WaterPriceconfig selectWaterPriceconfigById(Long id)
    {
        return waterPriceconfigMapper.selectWaterPriceconfigById(id);
    }

    /**
     * 查询价格设置列表
     *
     * @param waterPriceconfig 价格设置
     * @return 价格设置
     */
    @Override
    public List<WaterPriceconfig> selectWaterPriceconfigList(WaterPriceconfig waterPriceconfig)
    {
        return waterPriceconfigMapper.selectWaterPriceconfigList(waterPriceconfig);
    }

    /**
     * 新增价格设置
     *
     * @param waterPriceconfig 价格设置
     * @return 结果
     */
    @Override
    public int insertWaterPriceconfig(WaterPriceconfig waterPriceconfig)
    {
        waterPriceconfig.setCreateTime(DateUtils.getNowDate());
        return waterPriceconfigMapper.insertWaterPriceconfig(waterPriceconfig);
    }

    /**
     * 修改价格设置
     *
     * @param waterPriceconfig 价格设置
     * @return 结果
     */
    @Override
    public int updateWaterPriceconfig(WaterPriceconfig waterPriceconfig)
    {
        return waterPriceconfigMapper.updateWaterPriceconfig(waterPriceconfig);
    }

    /**
     * 批量删除价格设置
     *
     * @param ids 需要删除的价格设置主键
     * @return 结果
     */
    @Override
    public int deleteWaterPriceconfigByIds(Long[] ids)
    {
        return waterPriceconfigMapper.deleteWaterPriceconfigByIds(ids);
    }

    /**
     * 删除价格设置信息
     *
     * @param id 价格设置主键
     * @return 结果
     */
    @Override
    public int deleteWaterPriceconfigById(Long id)
    {
        return waterPriceconfigMapper.deleteWaterPriceconfigById(id);
    }
}
